#ifndef ATTENDWIM_H
#define ATTENDWIM_H

#include "qfaceobject.h"

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <opencv.hpp>
#include <QSqlTableModel>
#include <QSqlRecord>


QT_BEGIN_NAMESPACE
namespace Ui { class AttendWim; }
QT_END_NAMESPACE

class AttendWim : public QMainWindow
{
    Q_OBJECT

public:
    AttendWim(QWidget *parent = nullptr);
    ~AttendWim();
public slots:
    void recv_faceid(int64_t faceid);
signals:
    void query(cv::Mat& image);
private slots:
    void accept_client();
    void read_data();
private:
    Ui::AttendWim *ui;
    QTcpServer mserver;
    QTcpSocket *msocket;
    quint64 bsize;

    QFaceObject fobj;

    QSqlTableModel model;

};
#endif // ATTENDWIM_H
